package com.medical.medical.service;

import com.medical.medical.entity.Booking;
import com.medical.medical.mapper.BookingMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @authorDesc
 * @create 2022/9/15 10:56
 * @ClassName BookingServiceImpl
 * @Author YU
 * @description 预约 - 接口实现类
 */
@Service
@Slf4j
public class BookingServiceImpl implements BookingService{

    @Resource
    private BookingMapper bookingMapper;


    @Override
    public boolean addBooking(Booking booking) {
        try {
            return bookingMapper.addBooking(booking)>0;
        }catch (Exception e){
            e.printStackTrace();
            log.info("预约失败");
        }
        return false;
    }
}
